package com.bckj.fastboot.iot.parse.core;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.Map;

/**
 * ProtocolParseContext
 *
 * @author wfc
 **/
@Setter
@Getter
@ToString
public class ProtocolParseContext {
    private String devCode;
    private String protocolCode;
    private String cmd;
    private Map<String, Object> dataMap;

    public static ProtocolParseContext of(String devCode, String protocolCode, String cmd, Map<String, Object> dataMap) {
        ProtocolParseContext context = new ProtocolParseContext();
        context.setDevCode(devCode);
        context.setProtocolCode(protocolCode);
        context.setCmd(cmd);
        context.setDataMap(dataMap);
        return context;
    }
}
